﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Autofac;
using Autofac.Integration.Mvc;

namespace DynCMS.NET.Infrastructure.IOC.Autofac
{
    internal class DependencyResolver : IOC.MVC.DependencyResolver
    {
        public DependencyResolver(IContainer container)
        {
            this.Resolver = new AutofacDependencyResolver(container);
        }

        private AutofacDependencyResolver Resolver;

        public override IEnumerable<object> GetServices(Type serviceType)
        {
            return Resolver.GetServices<Type>();
        }
    }
}